package d0516_util包;

import java.util.*;

/**
 * 	取名助手类（静态工具类， 类似于 Arrays、Collections）
 * 
 * 	xxxHelper, xxxUtils 常见工具类名
 */
public class NameHelper {
	
	// 常用 100 个姓氏数组
	public static final String[] XINGS = {"李","王","张","刘","陈","杨","赵","黄","周","吴","徐","孙","胡","朱","高","林","何","郭","马","罗","梁","宋","郑","谢","韩","唐","冯","于","董","萧","程","曹","袁","邓","许","傅","沈","曾","彭","吕","苏","卢","蒋","蔡","贾","丁","魏","薛","叶","阎","余","潘","杜","戴","夏","钟","汪","田","任","姜","范","方","石","姚","谭","廖","邹","熊","金","陆","郝","孔","白","崔","康","毛","邱","秦","江","史","顾","侯","邵","孟","龙","万","段","漕","钱","汤","尹","黎","易","常","武","乔","贺","赖","龚","文"};

	// 常用男性名数组
	public static final String[] MAN_XINGS = {"嘉懿","煜城","懿轩","烨伟","苑博","伟泽","熠彤","鸿煊","博涛","烨霖","烨华","煜祺","智宸","正豪","昊然","明杰","立诚","立轩","立辉","峻熙","弘文","熠彤","鸿煊","烨霖","哲瀚","鑫鹏","致远","俊驰","雨泽","烨磊","晟睿","天佑","文昊","修洁","黎昕","远航","旭尧","鸿涛","伟祺","荣轩","越泽","浩宇","瑾瑜","皓轩","擎苍","擎宇","志泽","睿渊","楷瑞","子轩","弘文","哲瀚","雨泽","鑫磊","修杰","伟诚","建辉","晋鹏","天磊","绍辉","泽洋","明轩","健柏","鹏煊","昊强","伟宸","博超","君浩","子骞","明辉","鹏涛","炎彬","鹤轩","越彬","风华","靖琪","明诚","高格","光华","国源","冠宇","晗昱","涵润","翰飞","翰海","昊乾","浩博","和安","弘博","宏恺","鸿朗","华奥","华灿","嘉慕","坚秉","建明","金鑫","锦程","瑾瑜","晋鹏","经赋","景同","靖琪","君昊","俊明","季同","开济","凯安","康成","乐语","力勤","良哲","理群","茂彦","敏博","明达","朋义","彭泽","鹏举","濮存","溥心","璞瑜","浦泽","奇邃","祺祥","荣轩","锐达","睿慈","绍祺","圣杰","晟睿","思源","斯年","泰宁","天佑","同巍","奕伟","祺温","文虹","向笛","心远","欣德","新翰","兴言","星阑","修为","旭尧","炫明","学真","雪风","雅昶","阳曦","烨熠","英韶","永贞","咏德","宇寰","雨泽","玉韵","越彬","蕴和","哲彦","振海","正志","子晋","自怡","德赫","君平"};

	// 常用女性名数组
	public static final String[] WOMAN_XINGS = {"梦琪","忆柳","之桃","慕青","问兰","尔岚","元香","初夏","沛菡","傲珊","曼文","乐菱","痴珊","恨玉","惜文","香寒","新柔","语蓉","海安","夜蓉","涵柏","水桃","醉蓝","春儿","语琴","从彤","傲晴","语兰","又菱","碧彤","元霜","怜梦","紫寒","妙彤","曼易","南莲","紫翠","雨寒","易烟","如萱","若南","寻真","晓亦","向珊","慕灵","以蕊","寻雁","映易","雪柳","孤岚","笑霜","海云","凝天","沛珊","寒云","冰旋","宛儿","绿真","盼儿","晓霜","碧凡","夏菡","曼香","若烟","半梦","雅绿","冰蓝","灵槐","平安","书翠","翠风","香巧","代云","梦曼","幼翠","友巧","听寒","梦柏","醉易","访旋","亦玉","凌萱","访卉","怀亦","笑蓝","春翠","靖柏","夜蕾","冰夏","梦松","书雪","乐枫","念薇","靖雁","寻春","恨山","从寒","忆香","觅波","静曼","凡旋","以亦","念露","芷蕾","千兰","新波","代真","新蕾","雁玉","冷卉","紫山","千琴","恨天","傲芙","盼山","怀蝶","冰兰","山柏","翠萱","乐丹","翠柔","谷山","之瑶","冰露","尔珍","谷雪","乐萱","涵菡","海莲","傲蕾","青槐","冬儿","易梦","惜雪","宛海","之柔","夏青","亦瑶","妙菡","春竹","紫蓝","晓巧","幻柏","访蕊","南春","芷蕊","凡蕾","凡柔","安蕾","天荷","含玉","书兰","雅琴","书瑶","春雁","从安","夏槐","念芹","怀萍","代曼","幻珊","谷丝","秋翠","白晴","海露","代荷","含玉","书蕾","听白","访琴","灵雁","秋春","雪青","乐瑶","含烟","涵双","平蝶","雅蕊","傲之","灵薇","绿春","含蕾","从梦","从蓉","初丹。听兰","听蓉","语芙","夏彤","凌瑶","忆翠","幻灵","怜菡","紫南","依珊","妙竹","访烟","怜蕾","映寒","友绿","冰萍","惜霜","凌香","芷蕾","雁卉","迎梦","元柏","代萱","紫真","千青","凌寒","紫安","寒安","怀蕊","秋荷","涵雁","以山","凡梅","盼曼","翠彤","谷冬","新巧","冷安","千萍","冰烟","雅阳","友绿","南松","诗云","书芹","曼荷","笑珊","寒珊","谷南","慕儿","夏岚","友儿","小萱","紫青","妙菱","冬寒","曼柔","语蝶","青筠","夜安","觅海","问安","晓槐","雅山","访云","翠容","寒凡","晓绿","以菱","冬云","含玉","访枫","含卉","夜白","灵竹","醉薇","元珊","幻波","盼夏","元瑶","迎曼","水云","访琴","谷波","乐之","笑白","之山","妙海","紫霜","平夏","凌旋","孤丝","怜寒","向萍","凡松","白薇","梦菡","飞绿","如波","又晴","友易","香菱","冬亦","问雁","妙春","海冬","半安","平春","幼柏","秋灵","凝芙","念烟","白山","从灵","尔芙"};

	// 常用 100 个姓氏字符串
	public static final String XING_STRING = "李王张刘陈杨赵黄周吴徐孙胡朱高林何郭马罗梁宋郑谢韩唐冯于董萧程曹袁邓许傅沈曾彭吕苏卢蒋蔡贾丁魏薛叶阎余潘杜戴夏钟汪田任姜范方石姚谭廖邹熊金陆郝孔白崔康毛邱秦江史顾侯邵孟龙万段漕钱汤尹黎易常武乔贺赖龚文";

	// 常用男性名字符串
	public static final String MAN_WORD_STRING = "嘉懿,煜城,懿轩,烨伟,苑博,伟泽,熠彤,鸿煊,博涛,烨霖,烨华,煜祺,智宸,正豪,昊然,明杰,立诚,立轩,立辉,峻熙,弘文,熠彤,鸿煊,烨霖,哲瀚,鑫鹏,致远,俊驰,雨泽,烨磊,晟睿,天佑,文昊,修洁,黎昕,远航,旭尧,鸿涛,伟祺,荣轩,越泽,浩宇,瑾瑜,皓轩,擎苍,擎宇,志泽,睿渊,楷瑞,子轩,弘文,哲瀚,雨泽,鑫磊,修杰,伟诚,建辉,晋鹏,天磊,绍辉,泽洋,明轩,健柏,鹏煊,昊强,伟宸,博超,君浩,子骞,明辉,鹏涛,炎彬,鹤轩,越彬,风华,靖琪,明诚,高格,光华,国源,冠宇,晗昱,涵润,翰飞,翰海,昊乾,浩博,和安,弘博,宏恺,鸿朗,华奥,华灿,嘉慕,坚秉,建明,金鑫,锦程,瑾瑜,晋鹏,经赋,景同,靖琪,君昊,俊明,季同,开济,凯安,康成,乐语,力勤,良哲,理群,茂彦,敏博,明达,朋义,彭泽,鹏举,濮存,溥心,璞瑜,浦泽,奇邃,祺祥,荣轩,锐达,睿慈,绍祺,圣杰,晟睿,思源,斯年,泰宁,天佑,同巍,奕伟,祺温,文虹,向笛,心远,欣德,新翰,兴言,星阑,修为,旭尧,炫明,学真,雪风,雅昶,阳曦,烨熠,英韶,永贞,咏德,宇寰,雨泽,玉韵,越彬,蕴和,哲彦,振海,正志,子晋,自怡,德赫,君平";

	// 常用女性名字符串
	public static final String WOMAN_WORD_STRING = "梦琪,忆柳,之桃,慕青,问兰,尔岚,元香,初夏,沛菡,傲珊,曼文,乐菱,痴珊,恨玉,惜文,香寒,新柔,语蓉,海安,夜蓉,涵柏,水桃,醉蓝,春儿,语琴,从彤,傲晴,语兰,又菱,碧彤,元霜,怜梦,紫寒,妙彤,曼易,南莲,紫翠,雨寒,易烟,如萱,若南,寻真,晓亦,向珊,慕灵,以蕊,寻雁,映易,雪柳,孤岚,笑霜,海云,凝天,沛珊,寒云,冰旋,宛儿,绿真,盼儿,晓霜,碧凡,夏菡,曼香,若烟,半梦,雅绿,冰蓝,灵槐,平安,书翠,翠风,香巧,代云,梦曼,幼翠,友巧,听寒,梦柏,醉易,访旋,亦玉,凌萱,访卉,怀亦,笑蓝,春翠,靖柏,夜蕾,冰夏,梦松,书雪,乐枫,念薇,靖雁,寻春,恨山,从寒,忆香,觅波,静曼,凡旋,以亦,念露,芷蕾,千兰,新波,代真,新蕾,雁玉,冷卉,紫山,千琴,恨天,傲芙,盼山,怀蝶,冰兰,山柏,翠萱,乐丹,翠柔,谷山,之瑶,冰露,尔珍,谷雪,乐萱,涵菡,海莲,傲蕾,青槐,冬儿,易梦,惜雪,宛海,之柔,夏青,亦瑶,妙菡,春竹,紫蓝,晓巧,幻柏,访蕊,南春,芷蕊,凡蕾,凡柔,安蕾,天荷,含玉,书兰,雅琴,书瑶,春雁,从安,夏槐,念芹,怀萍,代曼,幻珊,谷丝,秋翠,白晴,海露,代荷,含玉,书蕾,听白,访琴,灵雁,秋春,雪青,乐瑶,含烟,涵双,平蝶,雅蕊,傲之,灵薇,绿春,含蕾,从梦,从蓉,初丹。听兰,听蓉,语芙,夏彤,凌瑶,忆翠,幻灵,怜菡,紫南,依珊,妙竹,访烟,怜蕾,映寒,友绿,冰萍,惜霜,凌香,芷蕾,雁卉,迎梦,元柏,代萱,紫真,千青,凌寒,紫安,寒安,怀蕊,秋荷,涵雁,以山,凡梅,盼曼,翠彤,谷冬,新巧,冷安,千萍,冰烟,雅阳,友绿,南松,诗云,书芹,曼荷,笑珊,寒珊,谷南,慕儿,夏岚,友儿,小萱,紫青,妙菱,冬寒,曼柔,语蝶,青筠,夜安,觅海,问安,晓槐,雅山,访云,翠容,寒凡,晓绿,以菱,冬云,含玉,访枫,含卉,夜白,灵竹,醉薇,元珊,幻波,盼夏,元瑶,迎曼,水云,访琴,谷波,乐之,笑白,之山,妙海,紫霜,平夏,凌旋,孤丝,怜寒,向萍,凡松,白薇,梦菡,飞绿,如波,又晴,友易,香菱,冬亦,问雁,妙春,海冬,半安,平春,幼柏,秋灵,凝芙,念烟,白山,从灵,尔芙";

	// 男性常用起名用字字符串
	public static final String MAN_STRING = "伟勇军磊涛斌强鹏杰峰超波辉刚健明亮俊飞凯浩华平鑫毅林洋宇敏宁建兵旭雷锋彬龙翔阳剑东博威海巍晨炜帅岩江松文云力成琦进昊宏欣坤冰锐震楠佳忠庆杨新骏君栋青帆静荣立虎哲晖玮瑞光钢丹坚振晓祥良春晶猛星政智琪永迪冬琳胜康彪乐诚志维卫睿捷群森洪扬科奇铭航利鸣恒源聪凡颖欢昕武雄洁川清义滨皓达民跃越兴正靖曦璐挺淼泉程韬冲硕远昆瑜晔煜红权征雨野慧萌山丰珂彤悦朋钧彦然枫嘉峥寅烨铮卓畅钊金可昱爽盛路晋谦克方闯耀奎一晟勤豪安尧全琛腾队鸿玉泽凌渊蕾广顺莹英峻攀宾驰燕霖喆椒国恺潇琨轶芳吉亚梁焱侃臻嵩岳炯艳宝岗斐啸元辰萍柯羽培通天麟晗菲雪铁贺钰戈灿琼锦生原洲炎丽勋奕艺中德轩京标旺南黎禹莉蔚总益祺骥沛汉真非鹤升蒙城钦锴骁壮罡键瑶虹石展翼为灏玲放娜露赞娟倩懿劲婷策魁霄冉敬卿均治迅臣桦镇骞河希瑾鹰舟丁涵弘纲泳理福俭乾纯双屹涌根怡果田岭昭飚勃嵘熙贤申琰宽鼎滔昌璞逸贵喜昂柳韶瑛伦茂景柱岚实珏霞园学惠衡风玺赫桐寒圣陈旋礼霆月侠密堃富薇仁浪津垒齐炼瀚泓灵朝夏严意银璇鲲易行品垄靓苏澄赛思旗淳雯继友和革延能菁叶隽烽昶笑裕鲁铎昀骅高翀润熠锟望卡微拓名秋冶雁开定想舒庚蓉牧重孟澎信郁珉钟盼恩周潮季烈魏奔承玎来桥尚增婧茜前琴麒竞童舜会柏冠佩游珊融满添咏响珩杉韧梅乔同梦树杭念遥苗胤榕耿崇湘里疆旻启烁楷才仲隆媛晴章舰璟桔李影亭珺言笛弛营宪渝发逊运豹翊研登炳蕊鉴妍焰颂闻桢镭特曙盟贝千保功竹印玥夭冀阔圆湛澍争众肖祯默珍煌余准忱宸普韦舸创芸彭泰心廷其业水焕炬韵裙干唯 轲陆陶将骋战歆朔耕崴操幸向葵潜凤兰仪沙胡璋秦珑朗举列蓓纬垚歌献或见多谊迎州声婕栩男衍洵犇颢照辛有育甲禄起淮弋坦量楚熹劫勉典诺溪显毓稳甫羿端旦焘辑宣宙岑存迁万煦渤沁甜日翰淦劼庭徽豫锬铸蚵也好颉雍怀北西耘秀肠玄令蓬联斯霁朕箭坡澜馨瀛港岱宗闽励飙琥谷异嵬垣年尉习格锨桑讳丛淞领深赢宜律朴龚卉化陵庄财墨直煊欧棋孝子弢冕傲劭丞如燃铖畏崧汀弦墩溢崎容锁韩曼汽地芬上佶连郑兆纪盾相翌盈慰戟植晏任农";

	// 女性常用起名用字字符串
	public static final String WOMAN_STRING = "静敏燕艳丽娟莉芳萍玲娜丹洁红颖琳霞婷慧莹晶华倩英佳梅雪蕾琴璐伟云蓉青薇欣琼宁平媛虹杰婧雯茜楠洋君辉菲琦妍阳波俊鑫磊军爽兰晨冰瑶瑾岩瑛悦群玮欢瑜蕊宇明珊涛荣超琪玉怡文岚杨婕旭凤健芬芸晓萌飞露菁惠宏瑞蓓林璇珍月利勤清帆迪微斌娇影巍朋莎彬峰昕乐星新烨晖卉晴曼越靖维晔艺睿芹淼黎畅椒鹏春彦柳梦毅博妮坤翠然钰蔚曦茹凌扬凡美彤园炜捷亮雁叶苗菊勇锐雨力翔庆方琰聪潇威甜帅进琛花雅立姣馨珏秀亚珂思哲冉骊双娅胡培斐嘉莲莺佩剑娴玥真凯裙源奕靓侠枫洪姝敬希锦姗昱卓建兵冬强卫香焱容鸣硕浩纯韵玫婵巧笑俐羽舒盼涵峥雷可会航懿晗铭滢盈鸿茵灿程灵征金琨江贞路东煜圆贺一苹秋鹤珺南榕桦轶昊夏迎光智臻恒景吉银铮成松娣锋旋辰远樱糊坚苏喆沁霜霖皓刚晋田筠珠元湘嫣卿蒙京泓媚跃隽泉赛弘妹婉原环攀澜鹰音昆冲川芝娥贤昀野奇歌鸽竹璟苑诚滨萱霄嵘沙念汉岑桃骏谦安寅贝钦熙幸科如沛意果寒政柯芮鹃心海焕荔逸津渊尧天震瓤溪炎研颜赞营兴郑瑗益韶密歆易舟菡风笛龙爱民唯乔丰康渝驰葡祯郁蕴延俏恬毓腾杉岭诺峻缨永玎恋杏斯义俭漫正森丛漪昭硼蕙亭理铃咏岳桐璞非祺放炯焰葵依彩蝶筱戈苓为蔷展良想志总耘淳泽好妤妙翼羚竞品伶伊子烁鸥仙净格山忠肖麟默齐润淑轩蔓葳皎西绮沫桢童言禹涓严韬映赫翎玺霏达宜钧蜜泳纳忱熠振碧素珉情荟侃谊忆屹知旻珩秦飒赢或鹭霓韦桔荷吟仪励栋多炼嫒澄诗苇胜男艾习弦茗育曝石翊频蓝遥丁谨屏囡优顺鹂盟晏讳宾旎满游季楚俪凝劲礼曾眉盛颧衡辛融骅啸氛杭李娉萃芊朗痴耀克余响闻浪墩钥祥望朦嫚宝全芯陈洲行钊昂学栩仁咪连千冶旖姬晟肠稳霁恺桂茂台闽宪迅书勉霆革箐砚端旦蝴颂垄垚桥溢骞裕玄粼颍颉殷胤妲菱也典均缘梓旗煦赉飚灏郡玢键朝豫朔钢肪瑕勋刘前荃运嫱嵩牧来娓陶琚武雄筝恩堃单含绚淋添日殉孟尚照朵姿妃暖衍矫麒实骁信茉郦劫汀瀛猛城争芄勃喜女引获簧申韧晰禾翻醒鲲魏徽闪伦业尔熹戎桑绷冠颇白韫璜珑颢颐策虎联翀弛汇拉忻愉尤欧纬骥喻劼予翌繁珣慈豪彧允队令若洵汝娆权枚惟国滔奎尉夭闯俞鲁";

	/**
	 *	随机生成指定姓氏、指定性别的名字
	 * @param xing	姓氏
	 * @param isMan	性别
	 * @return
	 */
	public static String createName(String xing, boolean isMan) {
		String[] names = isMan ? MAN_XINGS : WOMAN_XINGS;
		Random r = new Random();
		int index = r.nextInt(names.length);
		String name = names[index];
		return xing + name;
	}

	/**
	 * 	随机生成指定姓氏、不分性别的名字
	 * @return
	 */
	public static String createName(String xing) {
		return null;
	}
	
	/**
	 *	随机生成指定性别的名字
	 * @param isMan true 表示男性, false 表示女性
	 * @return
	 */
	public static String createName(boolean isMan) {
		int index = new Random().nextInt(XINGS.length);
		String xing = XINGS[index];
		return createName(xing, isMan);
	}

	/**
	 * 	随机生成不分性别的名字
	 * @return
	 */
	public static String createName() {
		return null;
	}

	/**
	 * 	随机生成指定姓氏、指定性别的名字
	 * @param xing		姓氏
	 * @param isMan		是否是男性
	 * @param number	名的字数, 1~3 个字, 超过3个抛出 NameException 异常
	 * 					例如：赵建国：2，王勇：1
	 * @return
	 */
	public static String createName(String xing, boolean isMan, byte number) {
		return null;
	}
	
	/**
	 * 带参数运行, 不能直接使用右键run
	 * 
	 * 
	 * name 姓  true
	 * 
	 * name true
	 * 
	 * 
	 */
	public static void main(String[] args) {
		if(args.length == 2) {
			// 提取参数==> 转型
			String xing = args[0];
			boolean gender = Boolean.valueOf(args[1]);
			System.out.println(createName(xing,gender));
		} else if (args.length == 1){
			/**
			 * 如果只传姓氏, 那么valueOf会有异常, 你要捕获异常
			 */
			boolean gender = Boolean.valueOf(args[0]);
			System.out.println(createName(gender));
		} else {
			System.out.println("请输入正确的参数");
		}
		
	}
}
